#include<bits/stdc++.h>
using namespace std;
using ll = long long;
int main()
{
    ll t;cin >> t;
    while(t--)
    {
        ll n,m;
        cin >> n >> m;
        if(n==1||m==1||(n==2&&m==2))
            cout << "no\n";
  
            else cout << "yes\n";
        }  
    return 0;
}